/*
 * SymbolTuple.java
 *
 * Created on June 29, 2006, 10:00 PM
 *
 */

package galronnlp.util;

/**
 *
 * @author Daniel A. Galron
 */
public class SymbolTuple extends Tuple {
    
    /**
     * Creates a new instance of SymbolTuple
     */
    public SymbolTuple() {
        super(2);
    }
    
    public SymbolTuple(Symbol s1, Symbol s2) {
        this();
        this.array[0] = s1;
        this.array[1] = s2;
    }
    
    public int hashCode() {
        return ((Symbol)this.array[0]).hashCode() + ((Symbol)this.array[1]).hashCode();
    }
    
    public boolean equals(Object o) {
        SymbolTuple other = (SymbolTuple)o;
        boolean ret = ((Symbol)this.array[0]).equals((Symbol)other.array[0]) &&
                      ((Symbol)this.array[1]).equals((Symbol)other.array[1]);
        return ret;
    }
    
}
